Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update vof examples #1390

Merged
merged 19 commits into from
Nov 29, 2024
Merged

Update vof examples #1390

merged 19 commits into from
Nov 29, 2024

Conversation

AmishgaAlphonius
Copy link
Collaborator

@AmishgaAlphonius AmishgaAlphonius commented Nov 28, 2024

Description

Updates the following example before Lethe 1.0 release:

  • Dam-break
  • Rayleigh-Taylor instability
  • Capillary wave
  • Air bubble compression
  • Sloshing in a rectangular tank

Additionally, this PR reverts the squared term in the VOF DCDD stabilization correctional direction vector (#1103) to the power 1.

Checklist (will be removed when merged)

See this page for more information about the pull request process.

Code related list:

  • Lethe documentation is up to date
  • Copyright headers are present and up to date
  • The branch is rebased onto master
  • Code is indented with indent-all and .prm files (examples and tests) with prm-indent
  • Links are added to parent .rst files
  • The example is following the standard format

Pull request related list:

  • Labels are applied
  • There are at least 2 reviewers (or 1 if small feature) excluding the responsible for the merge
  • If this PR closes an issue or is related to a project, it is linked in the "Projects" or "Development" section
  • If any future works is planned, an issue is opened
  • The PR description is cleaned and ready for merge

@AmishgaAlphonius AmishgaAlphonius added Quick fix Ready for review Example Next release PR that would need to be merged before the next release labels Nov 28, 2024
@AmishgaAlphonius AmishgaAlphonius self-assigned this Nov 28, 2024
@AmishgaAlphonius AmishgaAlphonius added WIP When a PR is open but not ready for review and removed Ready for review labels Nov 28, 2024
@AmishgaAlphonius
Copy link
Collaborator Author

I forgot to update the tests after the revert of the dcdd term. I will do so tomorrow morning!

@AmishgaAlphonius AmishgaAlphonius added Ready for review and removed WIP When a PR is open but not ready for review labels Nov 28, 2024
Copy link
Collaborator

@hepap hepap left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job with these updates and finding the bug :)

Comment on lines +19 to +38
Enstrophy: 97.103
Kinetic energy: 0.001011

*******************************************************************************
Transient iteration: 3 Time: 0.003 Time step: 0.001 CFL: 0.17532
Transient iteration: 3 Time: 0.003 Time step: 0.001 CFL: 0.17531
*******************************************************************************
Enstrophy : 299.29
Kinetic energy : 0.0039173
Enstrophy: 299.47
Kinetic energy: 0.0039228

*******************************************************************************
Transient iteration: 4 Time: 0.004 Time step: 0.001 CFL: 0.30998
Transient iteration: 4 Time: 0.004 Time step: 0.001 CFL: 0.31002
*******************************************************************************
Enstrophy : 513.69
Kinetic energy : 0.0079426
Enstrophy: 513.9
Kinetic energy: 0.0079503

*******************************************************************************
Transient iteration: 5 Time: 0.005 Time step: 0.001 CFL: 0.40316
Transient iteration: 5 Time: 0.005 Time step: 0.001 CFL: 0.40314
*******************************************************************************
Enstrophy : 705.36
Kinetic energy : 0.012344
Enstrophy: 705.51
Kinetic energy: 0.012354
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I checked, and it went back to the same values as before the square DCDD

@@ -28,4 +28,4 @@ Transient iteration: 2 Time: 0.2 Time step: 0.1 CFL: 1.64181
VOF Mass Conservation
----------------------
time surface_fluid_0 mass_per_length_fluid_0 momentum-x_fluid_0 momentum-y_fluid_0 surface_fluid_1 mass_per_length_fluid_1 momentum-x_fluid_1 momentum-y_fluid_1 sharpening_threshold
2.000000e-01 6.579242e-01 7.895070e-01 -2.229965e-02 4.765510e-02 3.420758e-01 3.420758e+02 1.863059e+01 -4.003717e+01 5.000000e-01
2.000000e-01 6.579141e-01 7.894950e-01 -2.231310e-02 4.763344e-02 3.420859e-01 3.420859e+02 1.864223e+01 -4.002050e+01 5.000000e-01
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but not this one :o

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for taking the time to check them! :)
The values changed a bit with the fix on the pressure interpolation on faces (#1234) and we can see that the values remain somewhat similar to the ones that are overwritten.

CHANGELOG.md Outdated Show resolved Hide resolved
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You better leave the white background for dark mode

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I forgot to reveal it before exporting!

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks clean with the new colors

@@ -28,4 +28,4 @@ Transient iteration: 2 Time: 0.2 Time step: 0.1 CFL: 1.53178
VOF Mass Conservation
----------------------
time surface_fluid_0 mass_per_length_fluid_0 momentum-x_fluid_0 momentum-y_fluid_0 surface_fluid_1 mass_per_length_fluid_1 momentum-x_fluid_1 momentum-y_fluid_1 sharpening_threshold
2.000000e-01 6.579652e-01 7.895557e-01 -2.004270e-02 4.448404e-02 3.420348e-01 1.710176e+01 8.361416e-01 -1.863500e+00 5.000000e-01
2.000000e-01 6.579587e-01 7.895478e-01 -2.005946e-02 4.446851e-02 3.420413e-01 1.710209e+01 8.365478e-01 -1.862997e+00 5.000000e-01
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nor this one! The rest of the application tests returned to their previous values (before the square)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here :)

Copy link
Contributor

@blaisb blaisb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some comments to address


--------
Features
--------

- Solver: ``lethe-fluid``
- Volume of fluid (VOF)
- Unsteady problem handled by an adaptive BDF2 time-stepping scheme
- Unsteady problem handled by an adaptive BDF2 time stepping scheme
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- Unsteady problem handled by an adaptive BDF2 time stepping scheme
- Unsteady problem handled by an adaptive BDF2 time-stepping scheme

time-stepping is a compound noun and takes an hyphen in this case. I am pretty sure of that.


-----------------------
Description of the Case
-----------------------

Predicting the dynamics of free surface waves is essential for many industrial applications (e.g. transport of liquified natural gas).
Predicting the dynamics of free surface waves is essential for many industrial applications (e.g. transport of liquefied natural gas).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -64,7 +68,7 @@ Parameter File
Simulation Control
~~~~~~~~~~~~~~~~~~

The results for this problem are highly sensitive to the accuracy of the time-stepping scheme. For this reason, we use a 2nd order backward differentiation scheme (``bdf2``) with a variable time step. The ``adaptive time step scaling`` is set to :math:`1.025` to ensure that the time-step does not rise too quickly during wave oscillations.
The results for this problem are highly sensitive to the accuracy of the time stepping scheme. For this reason, we use a 2nd order backward differentiation scheme (``bdf2``) with a variable time step. The ``adaptive time step scaling`` is set to :math:`1.025` to ensure that the time step does not rise too quickly during wave oscillations.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The results for this problem are highly sensitive to the accuracy of the time stepping scheme. For this reason, we use a 2nd order backward differentiation scheme (``bdf2``) with a variable time step. The ``adaptive time step scaling`` is set to :math:`1.025` to ensure that the time step does not rise too quickly during wave oscillations.
The results for this problem are highly sensitive to the accuracy of the time-stepping scheme. For this reason, we use a 2nd order backward differentiation scheme (``bdf2``) with a variable time step. The ``adaptive time step scaling`` is set to :math:`1.025` to ensure that the time-step does not rise too quickly during wave oscillations.

The correct form is "time-step" (with a hyphen) when used as a noun. The hyphen is used here to combine "time" and "step" into a single, unified term. Without the hyphen (as in "time step"), it might be unclear whether you're referring to the concept of a step in time or two separate ideas (a "time" and a "step").

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've changed them!


-------
Results
-------

We compare the relative height of the free surface at :math:`x=0` with an analytical solution proposed by Wu *et al.* [#wu2001]_ For the Reynolds number of :math:`2`, :math:`20` and :math:`200`, data were directly extracted from Carrica *et al.* [#carrica2007]_, whereas for the Reynolds of :math:`2000`, the simplified analytical expression of Wu *et al.* [#wu2001]_ is used. The results for Reynolds number of :math:`2`, :math:`20`, :math:`200` and :math:`2000` can be post-processed by invoking the following command from the folder of the Reynolds number of interest (:math:`Re=20` in the example below):
We compare the relative height of the free surface at :math:`x=0` with an analytical solution proposed by Wu *et al.* [#wu2001]_ For the Reynolds number of :math:`2`, :math:`20` and :math:`200`, data were directly extracted from Carrica *et al.* [#carrica2007]_, whereas for the Reynolds of :math:`2000`, the simplified analytical expression of Wu *et al.* [#wu2001]_ is used. The results for Reynolds number of :math:`2`, :math:`20`, :math:`200` and :math:`2000` can be postprocessed by invoking the following command from the folder of the Reynolds number of interest (:math:`Re=20` in the example below):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@blaisb blaisb merged commit cf20bfd into master Nov 29, 2024
11 checks passed
@blaisb blaisb deleted the update-vof-examples branch November 29, 2024 11:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Example Next release PR that would need to be merged before the next release Quick fix Rebased Reviewed and ready to merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants